package json;

import java.util.ArrayList;
import java.util.List;

import org.json.simple.JSONAware;
import org.json.simple.JSONObject;

public class FileGoogleDriver implements JSONAware {
	private String id;
	private String title;
	private String mimeType;
	private List<FileGoogleDriver> listsubfile;

	public FileGoogleDriver(String id, String title, String mimeType) {
		this.id = id;
		this.title = title;
		this.mimeType = mimeType;
		listsubfile = new ArrayList<FileGoogleDriver>();

	}

	public List<FileGoogleDriver> getListsubfile() {
		return listsubfile;
	}

	public void setListsubfile(List<FileGoogleDriver> listsubfile) {
		this.listsubfile = listsubfile;
	}
	
	public void addsubfile(FileGoogleDriver f)
	{
		listsubfile.add(f);
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getMimeType() {
		return mimeType;
	}

	public void setMimeType(String mimeType) {
		this.mimeType = mimeType;
	}

	public String toJSONString() {
		StringBuffer sb = new StringBuffer();

		sb.append("{");

		sb.append(JSONObject.escape("id"));
		sb.append(":");
		sb.append("\"" + JSONObject.escape(id) + "\"");

		sb.append(",");

		sb.append(JSONObject.escape("title"));
		sb.append(":");
		sb.append(title);

		sb.append("}");

		return sb.toString();
	}
}
